<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title> {$action} | {:get_opinion('title')}</title>

    <include file="Public:head"/>

</head>
<body class="skin-black">

{:W('Common/header')}

<div class="wrapper row-offcanvas row-offcanvas-left">
    {:W('Common/sideMenu')}


    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->


        <section class="content-header">
            <h1>
                {$action}
                <small>{$Think.config.title}</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{$module_url}"><i class="fa fa-dashboard"></i> {$module}</a></li>
                <li class="active">{$action}</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-md-12">
                    <div class="box box-warning">
                        <div class="box-header">
                            <h3 class="box-title">{$action}</h3>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">

                            <!-- BEGIN EXAMPLE TABLE PORTLET-->
                            <form action="{$form_action}" name="change"
                                  method="post">

                                <div class="form-group">
                                    <label class="control-label">名称</label>

                                    <div class="controls">
                                        <input type="text" placeholder="" class="form-control large" name="name"
                                               value="{$weixin_menu_now.name}"/>
                                        <span class="help-inline"></span>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="control-label">类型</label>

                                    <div class="controls">
                                        <select class="small form-control" tabindex="1" name="reply_type"
                                                id="reply_type">
                                            <option value="click" selected="selected">点击</option>
                                            <option value="view">链接</option>
                                            <option value="empty">空(建一个同等级的节点)</option>


                                        </select>
                                    </div>

                                </div>


                                <div class="form-group" id="key">
                                    <label class="control-label">键值</label>

                                    <div class="controls">
                                        <input type="text" placeholder="" class="form-control large" name="key"
                                               value="{$weixin_menu_now.key}"/>
                                        <span class="help-inline"></span>
                                    </div>
                                </div>


                                <div class="form-group" id="url">
                                    <label class="control-label">URL</label>

                                    <div class="controls">
                                        <input type="text" placeholder="" class="form-control large" name="url"
                                               value="{$weixin_menu_now.url}"/>
                                        <span class="help-inline"></span>
                                    </div>
                                </div>


                                <div class="form-actions">
                                    <button type="submit" class="btn bg-blue"><i class="icon-ok"></i>{$action_name}
                                    </button>
                                </div>

                            </form>


                        </div>
                    </div>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </aside>
    <!-- /.right-side -->
</div>
<!-- ./wrapper -->

<include file="Public:foot"/>

<script>
    jQuery(document).ready(function () {
        $('input').iCheck('destroy');


        var reply_type = $('#reply_type option:selected').val();
        if (reply_type == 'click') {
            $('#url').fadeOut();
            $('#key').fadeIn();

        } else if (reply_type == 'view') {
            $('#url').fadeIn();
            $('#key').fadeOut();

        } else if (reply_type == 'empty') {
            $('#url').fadeOut();
            $('#key').fadeOut();

        }


        $('#reply_type').change(function () {
            var reply_type = $('#reply_type option:selected').val();

            if (reply_type == 'click') {
                $('#url').fadeOut();
                $('#key').fadeIn();
            } else if (reply_type == 'view') {
                $('#url').fadeIn();
                $('#key').fadeOut();

            } else if (reply_type == 'empty') {
                $('#url').fadeOut();
                $('#key').fadeOut();

            }

        });


    });
</script>
</body>
</html>